package top.zhangjianyong.netty.nio;

import java.nio.IntBuffer;

public class BasicBuffer {
    public static void main(String[] args) {
        IntBuffer intBuffer=IntBuffer.allocate(5);
        intBuffer.put(3);
        intBuffer.put(5);
        intBuffer.put(2);
        intBuffer.put(9);
        intBuffer.put(22);

        intBuffer.flip();
        System.out.println(intBuffer.get());
        System.out.println(intBuffer.get());
        System.out.println(intBuffer.get());
        System.out.println(intBuffer.get());
        System.out.println(intBuffer.get());
        System.out.println(intBuffer.get());
    }
}
